Explorations in LCS Models of Stock Trading
نویسندگان
چکیده
In previous papers we have described the basic elements for building an economic model consisting of a group of artificial traders functioning and adapting in an environment containing real stock market information. We have analysed the feasibility of the proposed approach by comparing the final wealth generated by such agents over a period of time, against the wealth of a number of well known investment strategies, including the bank, buy-and-hold and trend-following strategies. In this paper we review classical economic theories and introduce a new strategy inspired by the Efficient Market Hypothesis (named here random walk to compare the performance of our traders. In order to build better trader models we must increase our understanding about how artificial agents learn and develop; in this paper we address a number of design issues, including the analysis of information sets and evolved strategies. Specifically, the results presented here correspond to the stock of IBM. 1 Forecasting Financial Markets Modelling real financial markets is not an easy task, it was once said that: “anybody doing applications of artificial intelligence (AI) in financial trading and investment management must possess considerable determination and vast reserves of optimism.” [13] Why? The generalised growth in complexity of financial markets has been one of the most significant changes seen in the past decade. As a result, the difficulty of the decision making process has increased dramatically, becoming more dependent upon the analysis of information gathered and available data coming from many different sources and in various forms. The results of various quantitative forecasting techniques, as well as human subjective skills and judgment, serve as an important tool for strategic decisions to most financial institutions. The high levels of activity seen in financial markets nowadays, along with the vast amounts of information available, produce multidimensional financial time series where the general mechanism that generates them is poorly understood. Much research has been devoted to trying to find some kind of model that has good explanatory power of the variables involved but is still of relatively low complexity. With the hope of finding the key to increased wealth, a common approach to follow is to try to look for previously undetected nonlinear regularities (such as daily or intra-daily fluctuations) from economic time series. This can be done in several ways. In some models, data derived from only one time series is used, such as a specific stock’s price, a given index or the one-day rate of return to holding a stock. Readers interested in a neural net (NN) model of this type are referred to [42], where inputs are defined as the one-day return of a stock rt , and for a genetic programming model where inputs are defined as the difference between the current price of a single stock and its moving averages, highest and lowest prices, refer to [40, 41, 26, 27]. In addition to using a single price series, other approaches use more variables and in different levels of sophistication (see [8, 18, 21]). These models can include over 120 inputs coming from other stock prices, volume of transactions, macro economic data, market indicators such as indexes, profit and earnings ratios, etc. More recently, as a result of the fast growth of the Internet, other approaches started to emerge, such as the work on text in finance [43, 38, 39]. Much of this effort concentrates on finding profitable trading rules from the analysis of text information of financial interest publicly available on the Internet – chat boards or news stories. The problem of designing trader models with relevant indicators has been addressed in [32], where it is also proposed to use genetic algorithms to optimise simple trading models. Also, a number of conferences report many papers on financial time series analysis and prediction. Specially, during the early nineties, when the use of neural networks appeared to be an area of great potential in securities forecasting, dozens of papers using neural networks were published. A good review of these results can be found in [1–4], and for a good summary of techniques used, see [30]. Although later on the revolution came to an end, what that era brought to the surface was perhaps the need to address the fallacies encountered with traditional approaches and the need to search for non-linear models capable of handling the complex task of forecasting. Too much was expected from NNs, and soon people were going to realise that, as pointed out by Halbert White when reporting his results, “in either case the implication is the same: the neural network is not a money machine” [42]. It then seems reasonable to suppose that in financial markets, investment decisions must involve taking into account a significant number of elements and their relationships, which due to the complex nature of economic systems, are usually difficult to understand and highly non-linear. Even though some investment managers and traders could factor in such dependencies in the analysis, they often cannot explain their decisions and point out the significant elements and relationships contributing to their current positions; other times, due to secrecy policies, they are just not willing to do so. This makes the problem of economic forecasting very hard, as there is no actual knowledge easily available and controversies and debates as to what is the right investment approach are still in question. In the following section we will review some of these. 1 The one-day return of a stock is defined as rt = pt−pt−1+dt pt−1 , where p1 is the closing price of the stock in question on day t and dt is the dividend it paid on day t. This value should be adjusted to stock splits and dividends if appropriate. 2 Classical Economic Theories With tremendous impact in industry and academia, the Efficient Markets Hypothesis (EMH) has been perhaps one of the strongest weapons against the development of economic forecast approaches described in the previous section. The hypothesis first appeared in the famous and highly controversial PhD dissertation of Eugene F. Fama at the University of Chicago, under the title “The Behaviour of Stock Market Prices”, and was originally published in the Journal of Business [15]. In addition to this work, Fama also published ideas of this kind in a number of journal papers, such as “Random Walks in Stock Market Prices” which appeared in, amongst others, the Institutional Investor [14], where the following excerpt is taken: “An ‘efficient’ market is defined as a market where there are large numbers of rational, profit-maximisers actively competing, with each trying to predict future market values of individual securities, and where important current information is almost freely available to all participants. In an efficient market, competition among the many intelligent participants leads to a situation where, at any point in time, actual prices of individual securities already reflect the effects of information based both on events that have already occurred and on events which, as of now, the market expects to take place in the future. In other words, in an efficient market at any point in time the actual price of a security will be a good estimate of its intrinsic value.” The great impact of EMH dispersed rapidly from academia to the investment community. Fama’s 1970 paper on the topic “Efficient Capital Markets” [16] argues that on average, it is nearly impossible for an individual to consistently beat the stock market as a whole because of the broad availability of public information. Therefore markets are assumed to be efficient if all available information is reflected in current market prices [16, 17]. Some people think this is equivalent to saying that an investor who throws darts at a newspaper’s stock listings has as much chance at beating the market as any professional investor. In summary, the statement that stock price behaviour is random and not predictable by any forecasting method had become a dominant paradigm used by economists to understand and investigate the behaviour of financial markets. Looking for more evidence to sustain this theory, Fama later studied all the funds that survived during a 20-year period starting in 1976. But because these funds were naturally biased from being survivors during the period, he reduced the sample by choosing only the 20 biggest winners from the first ten years and analysed their performance over the second 10 years relative to a risk-corrected model. Not surprisingly for him, he found out that exactly half of them were above average and the other half below. This means that the best performers had a 50% chance to succeed over the next period. With this new evidence he continues to favour passive management over active management. But still, for those who do not follow the EMH, there were some winners over the whole period. (The biggest winner of all was Fidelity Magellan, credited to Peter Lynch.) The EMH also comes in many strengths, the first one being the “Weak form” of efficiency, which asserts that in a market that assimilates information efficiently it is impossible to predict the future price of a security on the basis of its past price because all past market prices and data are fully reflected in security prices, so there cannot be investment strategies which yield extraordinary profits on the basis of past prices – technical analysis is of no use. An argument in favour of this form of efficiency says that a short-term market-timing rule cannot make money because the opportunity goes away if everyone follows the same strategy. So the belief is that markets do not follow major patterns in stock prices, and the minor patterns caused by momentum are costly to explote. Evidence suggests that prices do appear to be random. The “Semi-strong” form refers to the degree of market reaction to events based on public information, which includes news announcements, annual reports, gossip columns, news clippings, etc. A market that impounds all of this information in its current price is known as semi-strong efficient. Most people believe that the U.S. equity markets by and large reflect publicly available information [19]. But the question of what is considered public information is still unanswered: is the information obtained through the Internet considered to be of public nature? Is all of this already impounded in the stock price? If so, at what rate was this information discounted in prices? A common guess is that the easier it was to get certain type of information, the more likely it is to have already been traded upon. Therefore in this view it is impossible to predict on the basis of publicly available fundamental information. Evidence supports that earnings and dividend announcements are incorporated into stock prices within 5 minutes. It is easy to see that against these two types of efficiency are a great number of experienced financial professionals and financial groups who usually take positions from public information, even though there is no proof that they can actually beat the market. Such evidence would be impossible to obtain for obvi2 Traditionally, investment managers have been categorised as active or passive types according to their trading profiles. Passive Management, also known as index management, focuses on the belief that people cannot get more than the market rate of return from the given category they are in because security prices are the best estimate of value, therefore no effort is needed to distinguish between one security over another to try to ’beat the market’. Portfolios are created to resemble the performance of well-known indexes and price adjustments are made in response to changes in the underlying universe or index. 3 Active management states that there are people who can make valuation judgments that are superior to the market; portfolios are constructed by using a variety of strategies which are believed to offer excess returns. There are more costs associated with this investment strategy than with passive investment because portfolios are usually more dynamic. ous reasons, but the fact is that it is hard to believe that they do not outperform the market somehow. Finally, the “Strong form” of efficiency analyses whether investors have private information to take advantage of. Private information includes insider information such as a personal note passed from a CEO to the CFO regarding a major financial decision, which according to this form of efficiency, would suddenly have an impact in the stock price! Not many people believe that the market is strong-form efficient. In this view it is, therefore, impossible to predict from any information at all. As previously stated, EMH became the dominant paradigm used by economists to understand financial markets. From the EMH derives the Random Walk Hypothesis (RWH), which states that future price movements cannot be predicted from past price movements alone; changes in prices are uncorrelated. The expected average change in price is zero and the best guess of price at time t + 1 is the price at time t given the information set available at time t. A commonly used analogy for the random walk is the flipping of a coin. In addition to the EMH and the RWH, a considerable body of economic theory and research centers on the notion of “rational expectations,” a classical economic theory formalised in the 1970s by Nobel laureate (1995) Robert E. Lucas, Jr. from the University of Chicago, who is believed to have the greatest influence in macroeconomics research since 1970. The basic assumptions of the Rational Expectations Theory (RET) are: 1. Economic actors (such as consumers or investors) behave rationally by collecting and studying carefully current and historical conditions 2. Markets are highly competitive 3. People act in response to their expectations The idea that in an efficient market a trading model cannot generate any excess returns is based on the assumption that all investors act according to the rational expectations model. Broadly speaking, the Rational Expectations Theory (RET) suggests that, in a stationary world, if all investors have the same data, they will all entertain the same expectations and those expectations will be true (or rational). The theory suggests that most participants in the stock market are “smart investors,” whose individual expectations, on average, anticipate the future correctly. 3 Against the Classical Hypotheses In favour of the EMH, Burton G. Malkiel in his book entitled “A Random Walk Down Wall Street” [29] agrees with a relaxed market efficiency in which transaction costs end up reducing any of the advantages a given strategy could offer, so that a buy-and-hold strategy of index funds produces higher returns. He shows that a broad portfolio of stocks selected by chance performs as well as one that has been carefully chosen by the experts. In this book he also compares the holes of the EMH to proverbial $10 bills lying in the gutter. The idea is that a given person cannot find $10 bills in gutters because someone else has already picked them up. However, as a response to these claims, Andrew W. Lo and A. Craig MacKinlay have provided important evidence showing that financial markets are not completely random. They have edited a number of their papers in the book entitled “A Non-Random Walk Down Wall Street” [28]. In this volume they put RWH to the test, finding that predictable components do exist in recent stock and bond returns. They also explain various techniques for detecting predictabilities and evaluating their statistical and economic significance and offer some of their views of the financial technologies of the future. By looking at a given historical sequence it is clear that price tends to trend in one direction for too long at each time. Another idea against RWH is that some people reinforce trends by not buying until they see a price trending upwards to assure their decision to buy that asset, confirming the idea that “the more people share a belief, the more that belief is likely to be true.” Therefore the behaviour of people second-guessing the expectations of others produces a self-fulfilling prophecy [33] where it follows that the price behaviour of each day depends, up to a certain point, on the price of past days. People then generate price movements, changing the dynamics of the market in ways that do not appear to be random. Such prophecies can deliver some elements of predictability that could be captured by some systems in practice. While there is no doubt as to the merit of RET in explaining many economic relationships, one must admit that it also departs from observed behaviours. The theory has two immediate limitations: first, we do not live in a stationary world but in one that is subject to change; and second, all investors will not necessarily reach the same conclusions, even when acting under the same observables. In addition to these, there are other factors such as emotions which often seem to play a significant role in economic decisions by bringing a certain degree of irrationality to our true perceptions. If the assumption of rational expectations is wrong to begin with, then the validity of its conclusion in the form of the EMH becomes also questionable. One could argue that markets are becoming more efficient in their handling of information, which is becoming easily and rapidly available, but the rate in which it is compounded into the prices is still subject of debate. The way people react to events can not be factored out immediately, their expectations are based on what they expect that others expect and therefore many differing actions affect the price dynamics in different ways. Some of these price changes can be predicted with some success by a number of important players in financial markets such as Olsen Group, D. E. Shaw & Co., Prediction Company, Parallax, and many other research boutiques. Finally, inconsistent with the EMT, one could also argue that not everybody would pick up the $10 bill even if they are the lucky ones to find it. There are a number of reasons why EMH may not be correct, because investors have a wide variety of reasons for trading, e.g. for a short-term profit or a steady profit with long-term stability, or some even to lose money. Transactions are also performed by reasons other than to make a profit; for example, the Government of France, buying francs to support their price rather than to make a profit. In this paper we have shown that there exists mixed evidence regarding market efficiency and trading profitability. Under classical economics security prices adjust rapidly to the arrival of new information, which comes to the market randomly and prices adjust rapidly to reflect the new information. Price adjustments are imperfect, yet unbiased, so that buying and selling securities as an attempt to outperform the market is just a game of chance rather than skill. As a result, the average investor can not beat the market and a prudent strategy to follow would be to buy some index funds or good stocks and hold them for a long period of time. But does this work in real markets? Are they efficient? Is the movement of the price really unpredictable? Is the reaction to news immediately adjusted and the stock market fully reflects the new information? As pointed out earlier, many investors disagree with this view, arguing that “new information is absorbed differently by different investors at different rates; thus, past price movements are a reflection of information that has not yet been universally recognised but will affect future prices” [34]. Still there are some open-end questions surrounding these concepts because EMH does not explicitly say that an individual cannot make money in the stock market (just the average of individuals cannot) or that it does not matter what such individual invests in – he/she will earn the same return in any case (again it is the average investor). It doesn’t say either that flipping a coin or throwing darts is an equally good method as any other for selecting stocks. It is implied that some methods will be good and others bad. By looking at history one can see that it has been possible to make money by anticipating. Whether it is economic shifts around the world or the possible outcome of a stock’s price in a short period of time, trying to anticipate events right is a crucial factor in financial markets. But this is not an easy task, Peter Lynch said in a recent interview “In this business if you’re good, you’re right six times out of ten. You’re never going to be right nine times out of ten”[5]. 4 Previous Work and New Objectives In the previous sections we presented different approaches, beliefs and theories concerning financial markets. It is not the purpose of this work to strongly agree with either one of them. However, we believe that it is likely that proper use of information can indeed help in the discovery of a set of trading rules which could perform better than the average (outperform the buy-and-hold strategy). We believe that if such rules could be found, they would not be profitable for a long period of time because market behaviour continuously changes, it never settles down. In this context the motivation of this work is based in the development of a number of artificial traders capable of generating and updating useful strategies in a continuous manner in order to check the consistency of the forecasting model over a long period of time. This paper follows on a number of topics addressed in our previous papers [36, 37], where we provided full description of both, the Learning Classifier System (LCS), and the variables used in the rule conditions for each of the three types of evolving traders of our stock market model. Such traders learn, forecast and trade their holdings in a real stock market scenario that is given exogenously, in the form of easily-obtained stock statistics such as various price moving averages, first difference in prices, volume ratios, etc. These artificial agent-types trade during a 10-15 year period with a fixed initial wealth to trade over two assets: a bond (represented by the bank with a fixed interest rate i) and a stock. To make the experiments as real as possible, agents also pay a fixed commission on every trade. The agent’s learning process is modelled by LCS; that is, as sets of bit-encoded rules. Each condition bit expresses the truth or falsehood of a certain real market condition. The actual conditions used differ between agents. In our previous papers, forecasting performance of our artificial agents has been compared against the performance of the buy-and-hold strategy, a trendfollowing strategy and the bank investment. In addition, in this paper we also compare performance against a new type of agent we have recently implemented, called the random walk agent. In [37] we addressed the question of whether it would be worth using a fixed random strategy for comparison purposes. Our response was negative, made on the grounds that because in this model all the agent-types start with random strategies, we have observed that those random strategies have not survived long; they have been replaced quickly by better ones because of the constant changes in the market environment and the learning process involved. We decided investigate this issue further by contributing to the already controversial topics surrounding traditional economic theories on Market Efficiency, Rational Expectations and Random Walk. We perform additional tests with the goal of addressing whether, on average, the performance of the agent-types is consistently better than the random walk agent. We have also addressed that this model allows us to experiment and learn more about important issues regarding the financial data involved in the decisionmaking process. Determining which items of information are more relevant than others or whether they are important at all can be achieved by looking at what the overall effect of subtracting these bits of information could have on performance. For example, there is considerable scope for experimenting with the mixture of rule conditions as a way of assessing whether we could manage to improve performance even further. In this paper we attempt to gain a better understanding of these issues in order to guide us in the design of better trader models. While choosing the right information set, it is important to explore whether a trader could benefit from more, or maybe less, information. Using more factors provides more clues but also multiplies the size of the search space so that the evolutionary process may come to be governed more by neutral genetic drift than by genuine selective pressure. Other sorts of information, such as external political or economic conditions, might be introduced in a simplistic way by, say, adding the behaviour of an index or similar gross indicators as an extra factor. We will address these issues in more detail in the following sections. 5 Reviewing The Model This section briefly describes the structure of the model, consisting of the following elements and the roles they play in the trading process: 1. Time, which is discrete and indexed by t, represents one cycle equivalent to one real trading day in the market. There are only about 253 trading days in a calendar year due to weekends and holidays, so when we refer to a ten year period of historical data in the following sections, it roughly corresponds to a total of 2,530 days. 2. Two assets traded, both with infinite supply: a risk free bond paying a fixed interest rate. In this case it is equivalent to a real bank’s investment, and a risky stock whose return will be ruled by the specific stock in question, with the restriction that the agent must be able to afford the amount of shares it wishes to buy. 3. One buy-and-hold agent which represents the so called buy-and-hold strategy – in this case, this agent simply puts all available cash into the stock at the start and then keeps it there, buying the stock at the initial price Pt, and of course paying a commission percentage when doing this single transaction. 4. The bank agent, which keeps all money in the bank at a good rate of interest, never buying the stock. Therefore this agent does not own any shares, all its possessions are cash, compounded in the bank at an interest rate of 8% p.a. (but the user can alter this). When given shares, it immediately sells them, paying the appropriate commission for the transaction. 5. One trend-following agent, representing a strategy that varies according to price moves. This is a type of momentum trader that buys all its money available in stocks at the end of the day if the price increased with respect to the previous day. Otherwise, it sells all the shares owned. This agent also pays commission for every transaction performed. 6. One random walk agent, who makes a daily random decision of whether to buy, sell or hold the stock, paying the corresponding commission. If the decision is to buy, 100% of its cash available is used for the purchase; in the same way, when the decision is to sell, it sells all the stocks in possession and the money obtained from the sale is all invested in the bank at the given interest rate. 7. Three heterogeneous agents (also referred as trader-types), whose decision making process is represented by a Michigan-style, strength-based LCS as described in [35–37]. These agents are designed to learn and adapt to a market environment that is partially understood and where the domain characteristics can change rapidly over time. In order to keep the model as simple as possible, only three types of traders have been introduced at this stage in the market and to make them truly heterogeneous, they all receive different sets of market information and make their own decisions by using different models. In what follows, these three types (agents) are called Tt1, Tt2, and Tt3. One type can not evolve into another type, but it can go broke and thus halt while another one can get rich. It is also possible for an agent to learn to ignore any particular field in the daily market information it receives, but it cannot ask for extra fields beyond those given to it. Note that the stock price does not change according to the supply and demand governed by the artificial trader-types, but rather by changes of real phenomena outside their scope. 8. The information set. This is comprised by the available raw data about the market, as well as data which has been processed in various ways. The raw data includes basic daily information about the stock such as its current price, volume of transactions, splits and dividends. The following represents a typical format in which most financial data is freely obtained through the Internet. This portion of data was taken from http://quote.yahoo.com and it corresponds to the Coca Cola stock during the month of April, year 2001: Date,Open,High,Low,Close,Volume 30-Apr-01,46.75,46.75,45.85,46.19,3837000 27-Apr-01,47.50,47.50,46,47,3480900 26-Apr-01,47.60,47.98,46.90,46.90,4296400 25-Apr-01,47.50,48.40,47.40,48.20,3247700
منابع مشابه
Arrival Dynamics of Informed and Uninformed Traders into Tehran Stock Exchange
Objective: The aim of this study is to model arrival process of informed and uninformed traders into Tehran Stock Exchange (TSE) as well as to assess the interaction between two types of traders which is an important yet neglected topic. Methods: In this study, a sequential trade model was estimated based on trading data of 33 stocks belonging to 11 industries of TSE during the period from 201...
متن کاملCosts of Stock Trading by Study on Commitment Components
In this paper, we are examining the relationship between stock trading costs and commitment components and find both abnormal and normal commitments associated with these costs are associated. Moreover, stock trading costs have a greater influence by both abnormal and normal negative commitments more than positive commitments. Further analysis has shown that in general, investors are unable to ...
متن کاملNoise Trading Approach of Capital Asset Pricing at Tehran Stock Exchange
Noise traders as one of the key elements of the market play a significant role in determining the market volatilities, returns, and stock market mispricing. Hence, this study attempts to scrutinize the role of noise trading in capital asset pricing. Therefore, by using daily data, samples including 14105 data of 200 companies listed on stock exchange were selected and noise trading index was es...
متن کاملRanking the Trading Symbols of the Largest Companies Listed in the Tehran Stock Exchange Based on the Probability of Informed Trade Criteria
I n this paper, trading symbols of the 30 largest companies listed in the Tehran Stock Exchange (TSE) were ranked based on the asymmetry information risk. Using the Ersan and Alici (2016) modified clustering algorithm (EA), we estimated the probability of informed trading (PIN) to measure the asymmetry information among traders for each trading symbol and trading day through two-year...
متن کاملProfitability of Momentum and Contrarian Strategies Based on Trading Volume in Tehran Stock Exchange: A Comparison of Emerging Market
In this study, the profitability of contrarian and momentum strategies were traded in mid- term based on trading volume. The stocks were categorized into three parts (high, middle and low) at the outset. Then, the relationship between excess return with three components such as cross-sectional risk, lead-lag effect and time-series pattern were examined based on Jegadeesh and Titman approach.The...
متن کاملAnalysis of the Behavior of Amateur and Professional Investors’ Impact on the Formation of Bubbles in Tehran Stock Market
The presence of bubbles in the markets and its formation has been regarded by economists and they have been looking to develop methods that can be recognized by using appropriate method for the formation of bubbles. In this paper, first, the formation of bubbles is tested using the new unit root test known as Phillips test (Generalized Sup ADF test) for 50 companies in the Tehran Stock Exchange...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2001